import { ref } from "vue";
import moment from "moment";

export function dayHook() {
  const today = ref(moment().format("YYYY-MM-DD"));
  const yandm = ref(moment().format("YYYY年MM月"));
  const day = ref(moment().format("DD"));
  const xq = ref(moment().format("d"));
  const setBigXq = xq => {
    if (xq === "0") return "日";
    if (xq === "1") return "一";
    if (xq === "2") return "二";
    if (xq === "3") return "三";
    if (xq === "4") return "四";
    if (xq === "5") return "五";
    if (xq === "6") return "六";
  };
  return {
    today,
    yandm,
    day,
    xq,
    setBigXq
  };
}
